class PlayerManager(object):
    def __init__(self):
        self.players = {}
        self.count = 0
        self.log = []
    
    def add_player(self,planet,name=None,ore=10):
        self.count += 1
        id = self.count
        player = {'id':id,
                  'name':name,
                  'ore':ore,
                  'planets':[],
                  'ships':[],
                  'view':[]}
        self.players[id] = player
        return player
    
    def clean(self):
        for p in self.player.keys():
            self.players[p]['ships'] = []
            self.players[p]['planets'] = []
            self.players[p]['view'] = []